package wsi.subgraph.entity;

import org.rygh.core.face.IHasValue;

import wsi.dataguide.tree.WSXmlLeaf;
import wsi.subgraph.tree.EntityLeaf;

public class ResolvePair extends XmlEntityPair implements IHasValue<Double> {

	private double probability = 0;

	public ResolvePair(WSXmlLeaf subroot, EntityLeaf entityNode) {
		super(subroot, entityNode);
	}

	public double getProbability() {
		return probability;
	}

	@Override
	public Double getValue() {
		return getProbability();
	}

	public void setProbability(double probability) {
		this.probability = probability;
	}

	@Override
	public String toString() {
		return String.format("%.3f,  %s <> %s", probability, getLeft()
				.getXpath(), getEntityLeaf().getValue());

	}
}
